import 'package:json_annotation/json_annotation.dart';

part 'business_type.g.dart';

@JsonSerializable()
class BusinessType {
  final String businessType; // 业务类型
  final String businessName; // 业务名称
  final String curBusinessLevel; // 当前店铺该业务类型的级别
  final String curBusinessLevelName; // 当前店铺该业务类型的级别名称
  final String description; // 业务描述
  final bool enabled; // 对于当前申请用户是否有效
  final String endTime; // 当前业务到期时间
  final int maxLevel; // 业务的最高级别数
  final String maxLevelName; // 业务最高级别的名称
  final String typeImageUrl; // 业务类型图标URL地址

  BusinessType(
    this.businessType,
    this.businessName,
    this.curBusinessLevel,
    this.curBusinessLevelName,
    this.description,
    this.enabled,
    this.endTime,
    this.maxLevel,
    this.maxLevelName,
    this.typeImageUrl,
  );

  factory BusinessType.fromJson(Map<String, dynamic> json) => _$BusinessTypeFromJson(json);

  Map<String, dynamic> toJson() => _$BusinessTypeToJson(this);
}
